<?php
/**
 * 系统配置
 * User: cxm
 * Date: 2019/10/21
 * Time: 10:13
 */

use Illuminate\Database\Seeder;
use App\Models\SystemConfig;

class SystemConfigTableSeeder extends Seeder{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::statement('SET FOREIGN_KEY_CHECKS = 0');//禁用外键约束
        DB::table('system_config')->truncate();
        DB::statement('SET FOREIGN_KEY_CHECKS = 1');//启用外键约束

        /** ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++系统配置start+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
        SystemConfig::create([
            'code'=>'system_name','name'=>'系统名称','val'=>'在线考试系统','group_code'=>',admin,','show_type'=>'input'
            ,'default_vals'=>'','default_names'=>'','is_show'=>1,'sort'=>1,'tooltip'=>'网站名称'
        ]);

        SystemConfig::create([
            'code'=>'logo','name'=>'平台logo','val'=>'','group_code'=>',admin,','show_type'=>'input'
            ,'default_vals'=>'','default_names'=>'','is_show'=>1,'sort'=>2,'tooltip'=>''
        ]);

        SystemConfig::create([
            'code'=>'record_number','name'=>'备案号','val'=>'','group_code'=>',admin,','show_type'=>'input'
            ,'default_vals'=>'','default_names'=>'','is_show'=>1,'sort'=>3,'tooltip'=>''
        ]);

        SystemConfig::create([
            'code'=>'service_number','name'=>'客服电话','val'=>'','group_code'=>',admin,','show_type'=>'input'
            ,'default_vals'=>'','default_names'=>'','is_show'=>1,'sort'=>4,'tooltip'=>'多个“,”隔开'
        ]);

        SystemConfig::create([
            'code'=>'email','name'=>'邮箱','val'=>'','group_code'=>',admin,','show_type'=>'input'
            ,'default_vals'=>'','default_names'=>'','is_show'=>1,'sort'=>5,'tooltip'=>''
        ]);

        /** ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++系统配置end+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/



    }
}